<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<head>
	<%@ taglib prefix="s" uri="/struts-tags"%>
	<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
	<style type="text/css">
<!--
#Layer1 {
	width: 1080px;
	border: 1px #cccccc solid;
}

#Layer2 {
	border-bottom: 1px #cccccc solid;
}

#Layer3 {
	width: 234px;
	height: 538px;
	z-index: 3;
	left: 773px;
	top: 29px;
}

#Layer4 {
	width: 200px;
	height: 115px;
	z-index: 1;
}

#top {
	width: 1080px;
}
-->
</style>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<link href="style/global.css" rel="stylesheet" type="text/css">
		<link href="style/style1.css" rel="stylesheet" type="text/css">
		<script language="JavaScript" src="javascript/blogValidator.js"></script>
		<title>查看日志</title>
		<sx:head />
	</head>

	<body>
		<div align="center">
			<div id="top">
				<%@include file="top.jsp"%></div>
			<div id="Layer1">
				<div id="Layer2">
					<br />
					<table width="750" class="table1">
						<tr>
							<td colspan="4">
								<div class="middleFont">
									<font size="4">${blog.articleTitle}&nbsp;&nbsp;&nbsp;</font>
									<font size="2"> <s:date name="blog.articlePublishDate"
											format="yyyy-MM-dd HH:mm" /> </font> &nbsp;&nbsp;&nbsp;

									<span class="browseBlog"> <c:if
											test="${blogUser.account==user.account}">
											<a
												href="/blog/browseToeditBlog.action?articleId=${blog.articleId}">编辑
											</a>
									
&nbsp;&nbsp;&nbsp;
									<a
												href="/blog/deleteBlog.action?articleId=${blog.articleId}&account=${blogUser.account}">删除</a>
										</c:if> </span>
							</td>
						</tr>

						<tr>
							<td height="80" colspan="4">
								<div align="left">
									${blog.articleContent}
								</div>
							</td>
						</tr>
						<s:if test="blog.voice!=null&&blog.voice!=''">
							<tr>
								<td colspan="4">
									<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="musicplayer" width="250" height="100"
			codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
			<param name="movie" value="player.swf" />
			<param name="quality" value="high" />
			<param name="bgcolor" value="#869ca7" />
			<param name="allowScriptAccess" value="sameDomain" />
			<param name="FlashVars" value="s=192.168.130.176&o=${blog.voice}"/>
			<embed src="player.swf" quality="high" bgcolor="#869ca7"
				width="200" height="100" name="musicplayer1" align="middle"
				play="true"
				loop="false"
				quality="high"
				allowScriptAccess="sameDomain"
				type="application/x-shockwave-flash"
				pluginspage="http://www.adobe.com/go/getflashplayer"
				FlashVars="a=dotcom">
			</embed>
	</object>
								</td>
							</tr>
						</s:if>
						<tr>
							<td colspan="4" class="smallfont">
								类别：
								<s:if test="blog.voice!=null&&blog.voice!=''">  
								  语音日志
					            </s:if>
								<s:else>
					             普通日志
		                       </s:else>
								&nbsp;&nbsp; 阅读（${blog.visitNumber}） &nbsp;&nbsp;

								评论(${fn:length(blog.comments)}) &nbsp;&nbsp; &nbsp;&nbsp;
								&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
								<s:if test="%{previousFlag==true}">
									<a
										href="/blog/previousBlog.action?articleId=${blog.articleId}&account=${user.account}">上一篇</a>

								</s:if>
								<s:else>								
									已是第一篇								
							</s:else>
								<s:if test="%{nextFlag==true}">
									<a
										href="/blog/nextBlog.action?articleId=${blog.articleId}&account=${user.account}">下一篇</a>
								</s:if>
								<s:else>								
									已是最后一篇								
							</s:else>
							</td>
						</tr>
						<tr>
						</tr>
					</table>
				</div>
				<div>
					<table>
						<s:iterator value="commentList" id="comment">


							<tr>
								<td width="40" height="40" rowspan="2">

									<img src="UploadImages/${comment.users.headImage}" width="40"
										height="40">

								</td>

								<td width="544">
									${comment.commentContent}
								</td>
							</tr>
							<tr>
								<td height="10" class="smallfont">
									${comment.commentDate }
								</td>
							</tr>
						</s:iterator>
					</table>

					<table>
						<tr>
							<td height="200">
								<div align="center">
									<img src="UploadImages/${blogUser.headImage}" width="40"
										height="40">
								</div>
							</td>
							<td>
								<form name="commentForm"
									action="/blog/addComment.action?articleId=${blog.articleId}&account=${blogUser.account }"
									method="post" onSubmit="return validateComment()">
									<table width="67%" style="border: 1px #bbbbbb solid">

										<tr bordercolor="#CCCC00">
											<td>
												<textarea name="commentContent" id="commentContent"
													cols="60" rows="10"></textarea>
											</td>
										</tr>

										<tr>
											<td height="25" align="center">
												<input class="button" type="submit" name="Submit" value="评论">
											</td>
										</tr>
									</table>
								</form>
							</td>
						</tr>
					</table>

				</div>
			</div>
		</div>


		<div id="bottom1"><%@include file="bottom.jsp"%></div>
	</body>
</html>
